// 例子44

class Person {
    constructor(name, age) {
        this.name = name;
        this.age = age;
    }

    getName() {
        return this.name;
    }

    static getAge() {
        return 'It\'s a secret';
    }
}

class Student extends Person {

}

let p = new Person('Tom', '18');
console.log(Person.getAge()); // "It's a secret"
console.log(Student.getAge()); // "It's a secret"
p.getAge(); // Uncaught TypeError: p.getAge is not a function